home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15013 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.7 KB  |  51 lines

  1. Path: newsfeed.concentric.net!not-for-mail
  2. From: SCLARK74@CRIS.COM (Steve Clark)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Trouble after executing spawnlp()
  5. Date: 16 Apr 1996 14:25:43 -0400
  6. Organization: Concentric Internet Services
  7. Sender: Sclark74@mariner.cris.com
  8. Message-ID: <Ka/cxUJdkXGI088yn@CRIS.COM>
  9. References: <RnqbxUJdkXGb088yn@CRIS.COM> <012341Z16041996@anon.penet.fi>
  10. NNTP-Posting-Host: mariner.cris.com
  11.  
  12. In article <012341Z16041996@anon.penet.fi>,
  13. an25305@anon.penet.fi (Cdr. Coriander Salamander) wrote:
  14. >In article <RnqbxUJdkXGb088yn@CRIS.COM>, SCLARK74@CRIS.COM (Steve Clark) writes:
  15. >> In a program I am writing, I use the spawnlp() function to run another
  16. >> small program.  After the call to spawnlp(), I always get a null file
  17. >> pointer when trying to open a text file.  What kind of things would
  18. >> cause this to happen?
  19. >
  20. >The other small program contained a virus,
  21. >and deleted all your files?
  22. >
  23. >--****ATTENTION****--****ATTENTION****--****ATTENTION****--***ATTENTION***
  24. >Your e-mail reply to this message WILL be *automatically* ANONYMIZED.
  25. >Please, report inappropriate use to                abuse@anon.penet.fi
  26. >For information (incl. non-anon reply) write to    help@anon.penet.fi
  27. >If you have any problems, address them to          admin@anon.penet.fi
  28.  
  29. Not quite.  Actually I knew the file existed I just couldn't read it in
  30. one particular function.  It turned out that I had a variable defined
  31. as:
  32.  
  33. char *reload = "/E";
  34.  
  35. which was causing the problem.  I changed it to
  36.  
  37. char reload[60];
  38.  
  39. and then:
  40.  
  41. strcpy(reload, "/E");
  42.  
  43. and Everything's fine now.  However, I still don't understand why this
  44. would cause a problem like that.  Any ideas?
  45.  
  46. Steve Clark
  47. CompuServe: 75027,3554
  48. Internet:   sclark74@cris.com
  49.  
  50.  
  51.